#Create ui_* files to load into python automatically
#to run: python compileUiFiles.py

from PyQt4 import uic
import os

def comp(filename):
	newName = 'ui_'+filename[:-3]+'.py'
	newFile = file(newName, 'w')
	uic.compileUi(filename, newFile)


if __name__=="__main__":
	print "Compiling all ui files"
	files = [i for i in os.listdir('.') if i.endswith('.ui')]
	for i in files:
		comp(i)